package activation;

public class SigmoidTanh implements ActivationFunction
{
	private double k;

	public SigmoidTanh(double k)
	{
		this.k=k;
	}

	public double getActivation(double membranePotential){
		return Math.tanh(k*membranePotential);
	}
	
	public double getActivationDerivative(double membranePotential) {
		return k*Math.cosh(k*membranePotential)/(Math.cosh(2*k*membranePotential)+1);
	}
}

